package cn.tedu.review;
/**测试构造函数*/
public class TestAnimal2 {
    public static void main(String[] args) {
        new Cat2();
    }
}
class Animal2{
    public Animal2() {
        System.out.println("父类的无参构造");
    }
    public Animal2(String s) {
        System.out.println("父类的含参构造"+s);
    }
}
class Cat2 extends Animal2{

    public Cat2() {
        super("哈哈哈");
        System.out.println("子类的无参构造");
    }

}